import React, { Component } from 'react'
import { Route,Switch } from 'react-router-dom';
import Home from './pages/home';
import About from './pages/about';
import Test from './pages/test';
import MyNvaLink from './components/MyNavLink';
export default class App extends Component {
  render() {
    return (
      <div className="container">
        <h1>www</h1>
        <div className="row">
          <div className="col-3">
            <div className="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
              <MyNvaLink to="/xixi/home">首页</MyNvaLink>
              <MyNvaLink to="/xixi/about">关于</MyNvaLink>
            </div>
          </div>
          <div className="col-9">
            <div className="tab-content" id="v-pills-tabContent">
              {/* Switch组件当路由匹配到一个就不会继续向下匹配了 */}
              <Switch>
                <Route path="/xixi/about" component={About}></Route>
                <Route path="/xixi/home" component={Home}></Route>
                <Route path="/xixi/home" component={Test}></Route>
              </Switch>
            </div>
          </div>
        </div>
      </div>
    )
  }
}
